<script>	
	var authTable;
	$(function(){
		
		   
		authTable = $("#authInfoLists").dataTable({
			"bSort" : false,
			"sPaginationType": "full_numbers",
			"bDestroy":true,
			"aoColumnDefs": [
                { "bSearchable": false, "bVisible": false, "aTargets": [4] },
                { "bSearchable": false, "bVisible": false, "aTargets": [5] }
            ]
		});
		
		
		var active_class = 'success';
		$('#authInfoLists').on('click', 'tbody tr' , function(){
			var $row = $(this).closest('tr');	
			if ($row.hasClass(active_class) == false) {
				authTable.$('tr.' + active_class).removeClass(active_class);
				$row.addClass(active_class);				
			}
		});
	});
	
	
	
	function showDetail(authUser,seqNo) {
		$("#authDetailIframe").load("${ctx}/auth/detail.do?authUser=" + authUser+"&seqNo="+seqNo+"");
		$("#authDetailIframe").show();
		$("#authDetailIframe").dialog("open");
	}

	
</script>
<br>

<div class="row">
  <div class="col-xs-12">
    <div class="table-header">
					转授权信息列表
	</div>
	<form>			
		<table id="authInfoLists"   class="table table-striped table-bordered table-hover">
	    <thead>
		<tr>
		    <th align="center"><b>被授权人</b></th>
		    <th align="center"><b>授权开始时间</b></th>	
			<th align="center"><b>授权到期时间</b></th>		
			<th align="center"><b>授权状态</b></th>
			<th align="center"><b>序号</b></th>
			<th align="center"><b>授权用户</b></th>
			<th></th>
		</tr>
		</thead>
		<tbody>
		
		<#list authInfoList as authInfo>
		
		   <tr>
		   <td><@libMacro.userNameWithoutId userId='${authInfo.authedUser}'/></td>
		   <td>${authInfo.authStartTime}</td>
		   <td>${authInfo.authEndTime}</td>
		   <td><@libMacro.dictName dictType='D00042' dictCode='${authInfo.authStatus}'/></td>
		   <td>${authInfo.seqNo}</td>
		   <td>${authInfo.authUser}</td>
		   <td>
									<div class="hidden-sm hidden-xs action-buttons">
										<a class="blue" href="#" onClick="javascript:showDetail('${authInfo.authUser}','${authInfo.seqNo}');">
											<i class="ace-icon fa fa-search-plus bigger-130"></i>
										</a>
									</div>

									<div class="hidden-md hidden-lg">
										<div class="inline pos-rel">
											<button class="btn btn-minier btn-yellow dropdown-toggle" data-toggle="dropdown" data-position="auto">
												<i class="ace-icon fa fa-caret-down icon-only bigger-120"></i>
											</button>

											<ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close">
												<li>
													<a href="#" class="tooltip-info" data-rel="tooltip" title="View" onClick="javascript:showDetail('${authInfo.authUser}','${authInfo.seqNo}');">
														<span class="blue">
															<i class="ace-icon fa fa-search-plus bigger-120"></i>
														</span>
													</a>
												</li>
											</ul>
										</div>
									</div>
			</td>
		   </tr>	
		</#list>
		</tbody>			
	</table>
	</form>
	</div>
</div>